package com.ruoyi.deeplearn.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.deeplearn.mapper.DeepClassifyTypeMapper;
import com.ruoyi.deeplearn.domain.DeepClassifyType;
import com.ruoyi.deeplearn.service.IDeepClassifyTypeService;

/**
 * 数据分类Service业务层处理
 * 
 * @author rww
 * @date 2023-09-14
 */
@Service
public class DeepClassifyTypeServiceImpl implements IDeepClassifyTypeService 
{
    @Autowired
    private DeepClassifyTypeMapper deepClassifyTypeMapper;

    /**
     * 查询数据分类
     * 
     * @param id 数据分类主键
     * @return 数据分类
     */
    @Override
    public DeepClassifyType selectDeepClassifyTypeById(Long id)
    {
        return deepClassifyTypeMapper.selectDeepClassifyTypeById(id);
    }

    /**
     * 查询数据分类列表
     * 
     * @param deepClassifyType 数据分类
     * @return 数据分类
     */
    @Override
    public List<DeepClassifyType> selectDeepClassifyTypeList(DeepClassifyType deepClassifyType)
    {
        return deepClassifyTypeMapper.selectDeepClassifyTypeList(deepClassifyType);
    }

    /**
     * 新增数据分类
     * 
     * @param deepClassifyType 数据分类
     * @return 结果
     */
    @Override
    public int insertDeepClassifyType(DeepClassifyType deepClassifyType)
    {
        deepClassifyType.setCreateTime(DateUtils.getNowDate());
        return deepClassifyTypeMapper.insertDeepClassifyType(deepClassifyType);
    }

    /**
     * 修改数据分类
     * 
     * @param deepClassifyType 数据分类
     * @return 结果
     */
    @Override
    public int updateDeepClassifyType(DeepClassifyType deepClassifyType)
    {
        deepClassifyType.setUpdateTime(DateUtils.getNowDate());
        return deepClassifyTypeMapper.updateDeepClassifyType(deepClassifyType);
    }

    /**
     * 批量删除数据分类
     * 
     * @param ids 需要删除的数据分类主键
     * @return 结果
     */
    @Override
    public int deleteDeepClassifyTypeByIds(Long[] ids)
    {
        return deepClassifyTypeMapper.deleteDeepClassifyTypeByIds(ids);
    }

    /**
     * 删除数据分类信息
     * 
     * @param id 数据分类主键
     * @return 结果
     */
    @Override
    public int deleteDeepClassifyTypeById(Long id)
    {
        return deepClassifyTypeMapper.deleteDeepClassifyTypeById(id);
    }
}
